package application

import (
	"ruoyi/domain/entity/common"
	"ruoyi/domain/entity/response"
	"ruoyi/domain/entity/system"
	"ruoyi/domain/repository"
)

type DictTypeApp struct {
	dictType repository.SysDictTypeRepository
}

var _ DictTypeAppInterface = &DictTypeApp{}

type DictTypeAppInterface interface {
	SelectSysDictTypeList(params common.SearchTableDataParam, isPage bool) common.TableDataInfo

	FindTypeDictById(dictId string) system.SysDictType

	SaveType(dictType system.SysDictType) response.Response

	UploadType(dictType system.SysDictType) response.Response

	DeleteDataType(dictIds string) response.Response

	RefreshCache() response.Response

	GetOptionSelect() response.Response
}

func (d *DictTypeApp) SelectSysDictTypeList(params common.SearchTableDataParam, isPage bool) common.TableDataInfo {
	return d.dictType.SelectSysDictTypeList(params, isPage)
}

func (d *DictTypeApp) FindTypeDictById(dictId string) system.SysDictType {
	return d.dictType.FindTypeDictById(dictId)
}

func (d *DictTypeApp) SaveType(dictType system.SysDictType) response.Response {
	return d.dictType.SaveType(dictType)
}

func (d *DictTypeApp) UploadType(dictType system.SysDictType) response.Response {
	return d.dictType.UploadType(dictType)
}

func (d *DictTypeApp) DeleteDataType(dictIds string) response.Response {
	return d.dictType.DeleteDataType(dictIds)
}

func (d *DictTypeApp) RefreshCache() response.Response {
	return d.dictType.RefreshCache()
}

func (d *DictTypeApp) GetOptionSelect() response.Response {
	return d.dictType.GetOptionSelect()
}
